﻿@using GdHotel.Data.Meta.Models
@using GdHotel.Data.Resources
@using GdHotel.Web.Models
@model HomeModel

@{
    ViewBag.Title = Localization.HotelName;
}

@section head{
    <link rel="stylesheet" href="@Url.Content("~/Content/themes/base/jquery-ui-1.8.12.custom.css")" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/datepicker.js")" type="text/javascript"></script>
}

@section gallery{
    @if (Model != null && Model.Gallery != null)
    {
        <text>@Html.Partial("_ShowGalleryBig", Model.Gallery)</text>
    }
}

@section bottomContent{
<div class="content_block fon">				
	<div class="wrap">
		<div class="content">
			<div class="in_content">
				<div class="block">
					<h2>@Localization.RoomsPhotos</h2>
					<ul class="photo_list">
                        @if (Model != null && Model.RoomsGallery != null)
                        {
                            foreach (var photo in Model.RoomsGallery.GetLinksAsArray())
                            {
                                <li>
                                    <div class="shadow">
                                        <div class="photo_wrap">
                                            <a href="#" class="open">												
                                                <img class="gl" src="@photo" width="638" height="353" alt="">
                                            </a></div>
                                    </div>

                                </li>
                            }
                        }
					</ul>									
				</div>
			</div>
		</div>
		<div class="sidebar">	
			<div class="in_sidebar">
				<h2>@Localization.HotelLocation</h2>							
				<div class="map_wrap">
					<div class="shadow">
						<div class="map"><a href="@Url.Action("Location", "About")"><img src="@Url.Content("~/Content/Images/map1.jpg")" width="284px" height="213px" alt="" /></a></div>
					</div>								
				</div>							
                @if (Model != null && Model.Note != null)
                {
                    <p>@Html.Raw(Model.Note.AddressShort)</p>
                }
			</div>
		</div>
	</div>

	<!--/wrap-->							
</div>
}

<div class="wrap">
	<div class="content">
		<div class="in_content clearfix">
			<div class="column">
				<div class="block">

					<h2>@Localization.News</h2>
					<ul class="news_list">
                        @foreach (var pieceOfNews in Model.News)
                        {
						    <li>
							    <p class="news_date">@pieceOfNews.PublicationDate.ToString("dd MMMM yyyy")</p>
							    <h4><a href="@Url.Action("Show", "News", new { id = pieceOfNews.Id })">@pieceOfNews.Title</a></h4>
							    <p>@pieceOfNews.ShortText</p>
						    </li>
                        }
					</ul>
					<p class="more"><a href="@Url.Action("Index", "News")">@Localization.ReadMore</a></p>
				</div>
				<!--/block-->
			</div>

			<div class="column">
                @if (Model != null && Model.Page != null)
                {
                    <div class="about_block block">
                        <h2>@Model.Page.Title</h2>
                        @Html.Raw(Model.Page.Text)
                    </div>
                }
			</div>
		</div>

	</div>

	<div class="sidebar">
		<div class="in_sidebar clearfix">
            @Html.Partial("_ReserveRoomPartial", new ReserveRoomModel())
		</div>
	</div>
</div>
